<?php
namespace app\pic\admin;
use app\system\admin\Admin;
use think\Db;

class PicCate extends Admin {
    protected $hisiTable = 'pic_cate';//表名称[通用添加、修改专用]
    public function index() {
        if($this->request->isAjax()){
            $page       = $this->request->param('page/d', 1);
            $limit      = $this->request->param('limit/d', 15);

            $model = Db::name('pic_cate')->alias('pc');
            $where = [];
            $data['data'] = $model->where($where)->page($page)->limit($limit)->select();
            $data['count'] = $model->where($where)->count('id');
            $data['code'] = 0;
            $data['msg'] = '';
            return json($data);
        }
        
		return $this->fetch('index');
    }
}
